package edu.nf.hotel.roompres.impl;

import edu.nf.hotel.roompred.RoomPred2;
import edu.nf.hotel.roompreddao.impl.RoomPredDaoImpl;
import edu.nf.hotel.roompres.RoomPredService;

import java.util.List;

/**
 * @Data 2023-06-29
 * @Author Lsw
 */
public class RoomPredServiceImpl implements RoomPredService {
    @Override
    public List<RoomPred2> listManage(RoomPred2 manage, int page, int limit) {
        int numberOf = page <= 1 ? 0 : (page-1) * limit;
        return new RoomPredDaoImpl().listManage(manage, numberOf, limit);
    }

    @Override
    public Long count(RoomPred2 manage) {
        return new RoomPredDaoImpl().count(manage);
    }
}
